#include <iostream>

int main(int argc, char *argv[])
{
	int sum = 0;
	int val = 1;
	
	//只要val的值小于10， while 就会一直执行
	while(val < 10){
		sum += val;
		val++;
	}
	
	std::cout << "sum of 1 to 10 inclusive is "
		<< sum << std::endl;
		
	return 0;
}